<%@page import="org.apache.jasper.tagplugins.jstl.core.Out"%>
<%@page import="com.xyz.Film"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>


<%@include file="/jsp/films/include/filmHeader.jsp" %>

<div id="content">
		
	
	<% 	HttpSession s=request.getSession();
		if (s.getAttribute("filmList")!=null){
			s.removeAttribute("filmList");
		}
		s.setAttribute("filmList", request.getAttribute("filmList"));
	%>
	<table >
		<tr>
			<th><a href="/mainpr/FilmsSortedByName" onmouseover="enableArrow('imgToShow1')" onmouseout="disableArrow('imgToShow1')">Назва фільму</a><img src="/mainpr/pic/down.png" id="imgToShow1" style="visibility:hidden; width:15px; height:15px; margin: 0; "/></th>
			<th><a href="/mainpr/FilmsSortedByYear" onmouseover="enableArrow('imgToShow2')" onmouseout="disableArrow('imgToShow2')">Рік</a><img src="/mainpr/pic/down.png" id="imgToShow2" style="visibility:hidden; width:15px; height:15px; margin: 0; "/></th>
		</tr>
		
		<c:forEach var="genre" items="${filmList}">
		<tr>
			<td><a href="/mainpr/jsp/films/${genre.id}.jsp">${genre.title}</a></td>
			<td>${genre.year}</td>
		</tr>
		</c:forEach>
	</table>
	
		
	
	
	
</div>


<%@include file="/jsp/includes/footer.jsp" %>